package com.example.stmp.Controller;

import com.example.stmp.Entity.Notice;
import com.example.stmp.Service.Notice.NoticeService;
import com.example.stmp.pojo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.HashMap;

@Slf4j
@RestController
@RequestMapping("/Notice")
public class NoticeController {

    @Autowired
    NoticeService noticeService;

    @PostMapping("show")
    public Result show(@RequestBody HashMap<String,String> map) {
        ArrayList<Notice> notices = noticeService.getNotice();
        return Result.success(notices);
    }
}
